import React from 'react'
import './ji.less'

export default function Ji(props) {
  let { close, xcon } = props
  console.log(xcon);

  return (
    <div>
      <div className="ji">
        <div className="jitop">
          <div className="left">
            <div>
              <span className="one">{xcon.name}</span>
              <span className="two">{xcon.course}</span>
            </div>

          </div>
          <div className="right">
            <p>积分:{xcon.nowpoint}</p>
            <p><a>积分调整</a></p>
          </div>
        </div>
        <div className="jicon">
          <table>
            <thead>
              <tr>
                <td>时间</td>
                <td>事件</td>
                <td>类型</td>
                <td>积分变动</td>
                <td>调整原因</td>
              </tr>
            </thead>
            <tbody>
              {
               JSON.parse( xcon.pointlist).map((item,index)=>{
                 return <tr>
                   <td>{item.time}</td>
                   <td>{item.event}</td>
                   <td >{item.type}</td>
                   <td className="type">{item.change}</td>
                   <td>{item.changevent}</td>
                 </tr>
               })
              }
            </tbody>
          </table>
        </div>
      </div>
    </div>
  )
}
